from time import ctime
from sklearn.externals import joblib

def getResultM(p, path, CH, PH, text_clf, subData):
    if p not in text_clf:
        try:
            text_clf[p] = joblib.load(path+str(p)+'.pkl')
        except:
            text_clf[p] =  None
    if text_clf[p] == None:
        classes = 0
        resultM = None
    else:
        resultM = text_clf[p].predict_log_proba(subData)
        classes = list(text_clf[p].steps[-1][-1].classes_)
    return [classes, resultM]
